mui.init()
/*var data = JSON.parse(localStorage.getItem("data"))
var  uid = data.uid;
var token = data.token;*/
var vm = new Vue({
	el: '.mui-content',
	data: {
		list: '',
	},
	updated: function() {

		$(".list").on("tap", function() {
			var self = $(this);
			
			var bookName=self.find(".Title").text()
			var bookUid=self.attr("uid");
			var obj={"bookName":bookName,"bookUid":self.attr("uid")}
			console.log(bookName)
			common.ajax("student/note/queryNoteGroupByBook", {
				uid: common.uid,
				token: common.token,
				bookUid: self.attr("bookUid"),
			}, function(data) {
				console.log(data)
				if(data.code == 200) {
					//common.open("Friend.html", "Friend.html",self.attr("uid"));
					common.open("Friend.html", "Friend.html",obj);
				} else {
					mui.toast(data.message)
				}
			}, 'get')

		})
		
		
		$(".seach_buttom").on("tap",function(){
			var value=document.querySelector('.seach_val').value;
			console.log(vm.list);
			vm.list ='';
			console.log(vm.list);
			
			common.ajax("student/note/queryNoteGroupByBook", {
				uid: common.uid,
				token: common.token,
				keyword:value
			}, function(data) {
				if(data.code == 200) {
					//console.log(data.data);
					//			console.log(data.data[0].bookPic);
					vm.list = data.data;
				} else {
					mui.toast(data.message)
				}
			}, "get");
		})
	}
});

Vue.use(VueLazyload, {
	             preLoad: 1.3,
	             error: '../../imges/jpimageshomeerrorimage.png',
	             loading: '../../imges/jpimageshomeerrorimage.png'
                      });

common.ajax("student/note/queryNoteGroupByBook", {
	uid: common.uid,
	token: common.token
}, function(data) {
	if(data.code == 200) {
		//console.log(data.data);
		//			console.log(data.data[0].bookPic);
		vm.list = data.data;
	} else {
		mui.toast(data.message)
	}
}, "get");


		
		
		

